<script>
/*
 * @Author: wzh 
 * @Date: 2021-06-14 12:46:13 
 * @Last Modified by: 1521620993@qq.com
 * @Last Modified time: 2021-06-14 12:47:53
 */
</script>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>漂亮的按钮式复选框</title>
  <link rel="stylesheet" href="index.css">
</head>
<body>
  <div class="container">
    <div class="switch">
      <div class="switch__1">
        <input id="switch-1" type="checkbox">
        <label for="switch-1"></label>
      </div>
      
      <div class="switch__2">
        <input id="switch-2" type="checkbox" checked>
        <label for="switch-2"></label>
      </div>
    </div>
  </div>
</body>
</html>